<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .loading{
            margin: 50px auto;
           width: 300px;
           height: 158px;
           border: 1px solid #000000; 
        }
        .loading>div{
            float: left;
            margin: 15px;
            border-radius: 15px;
            width: 30px;
            height: 100px;
            background-color: red;
            animation: loading 500ms ease 0s infinite alternate;
        }
        .loading>div:nth-child(2){
            background-color: green;
            animation-delay: 100ms;
        }
        .loading>div:nth-child(3){
            background-color: blue;
            animation-delay: 200ms;
        }
        .loading>div:nth-child(4){
            background-color: purple;
            animation-delay: 300ms;
        }
        .loading>div:nth-child(5){
            background-color: orange;
            animation-delay: 400ms;
        }
        .loading>p{
            text-align: center;
        }
        @keyframes loading {
            from{
                transform: scale(1,1);
            }
            to{
                transform: scale(1,0.5);
            }
        }
    </style>
</head>
<body>
    <div class="loading">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <p>loading</p>
    </div>
</body>
</html>